<div style="padding-bottom: 16px">
    <span style="margin-right: 8px;">
        <button nz-button nzType="primary" (click)="getMainData(pageSize, 1, {})">
            <i nz-icon nzType="fullscreen" nzTheme="outline"></i>
            <span>全部</span>
        </button>
    </span>
    <span style="margin-right: 8px;">
        <app-reportform btnType="primary">
            <i nz-icon nzType="pic-left" nzTheme="outline"></i>&nbsp;
            <span>新增汇报</span>
        </app-reportform>
    </span>
    <a nz-button nzType="primary" nzPlacement="right" nz-popconfirm nzCancelText="取消" nzOkText="确定"
        [nzTitle]="'确定要删除这'+selectedDataLen+'条数据吗?'" [nzCondition]="!(allChecked || indeterminate)"
        (nzOnConfirm)="delMaterials()">
        <i nz-icon nzType="delete" nzTheme="outline"></i>
        <span>删除</span>
    </a>
</div>
<nz-spin nzSize="large" [nzSpinning]="loadingData" [nzDelay]="200">
    <nz-table nzSize="small" nzBordered nzShowSizeChanger [nzData]="displayData" [nzFrontPagination]="false"
        [nzFooter]="itemsTotal&&'总共 '+ itemsTotal +' 条数据'" [nzTotal]="itemsTotal" [(nzPageIndex)]="pageIndex"
        (nzPageIndexChange)="getMainData(pageSize, pageIndex, params)" [(nzPageSize)]="pageSize"
        (nzPageSizeChange)="getMainData(pageSize, 1, {})" [nzShowQuickJumper]="itemsTotal>50">
        <thead>
            <tr>
                <th nzAlign="center"  nzShowCheckbox [nzIndeterminate]="indeterminate"
                    [(nzChecked)]="allChecked" (nzCheckedChange)="checkAll($event)"></th>
                <th nzAlign="center" >标题</th>
                <th nzAlign="center"  nzCustomFilter>车站
                    <app-goods-search [searchKey]="searchKeys[0]" [pageSize]="oldSize" [isGetAll]="isGetAll"
                        (loadingState)="getState($event)" (returnParams)="getMainData(pageSize,1,$event)">
                    </app-goods-search>
                </th>
                <th nzAlign="center"  nzCustomFilter>紧急修日期
                    <app-date-filter [pageSize]="oldSize" [isGetAll]="isGetAll" (loadingState)="getState($event)"
                        (returnParams)="getMainData(pageSize,1,$event)"></app-date-filter>
                </th>
                <th nzAlign="center" >汇报日期</th>
                <th nzAlign="center" >操作部门</th>
                <th nzAlign="center" >操作人</th>
                <th nzAlign="center" >操作时间</th>
            </tr>
        </thead>
        <tbody>
            <tr *ngFor="let data of displayData">
                <td nzShowCheckbox [(nzChecked)]="data.checked" (nzCheckedChange)="refreshStatus()"></td>
                <td nzAlign="center">
                    <app-reportform btnType="default" [apiIdentity]="apiIdentity" [readOnly]="true" [queryId]=data?.id>
                        <span>{{ data?.title }}</span>
                    </app-reportform>
                </td>
                <td nzAlign="center">{{ data?.station }}</td>
                <td nzAlign="center">{{ data?.emerDate.split(' ')[0] }}</td>
                <td nzAlign="center">{{ data?.reportDate.split(' ')[0] }}</td>
                <td nzAlign="center">{{ data?.operOrg }}</td>
                <td nzAlign="center">{{ data?.operUser }}</td>
                <td nzAlign="center">{{ data?.operTime }}</td>
            </tr>
        </tbody>
    </nz-table>
</nz-spin>